package com.acme.task5;

public class TextModifier {
    public final static String ERR_NUM_ARGS = "Program takes exactly one argument";

    public static void main(String[] args) {
        if (args.length != 1) {
            System.out.println(ERR_NUM_ARGS);
            return;
        }
        String str = args[0];
        for (int i = 0; i < str.length(); i++) {
            char charAtIndex = str.charAt(i);
            if (!Character.isDigit(charAtIndex)) {
                System.out.print(charAtIndex);
                if ((charAtIndex == '+') || (charAtIndex == '-')) {
                    System.out.print(charAtIndex);
                }
            }
        }
    }
}
